<template>
  <div class="admin">
    <el-container class="qq" style="height: 100vh">
      <el-header style="top: 0px">校园招聘系统管理员后台管理</el-header>
      <el-container>
        <div>
          <el-aside width="200px">
            <el-menu
              background-color="#545c64"
              text-color="#fff"
              active-text-color="#ffd04b"
              :default-active="activeIndex"
              router
            >
              <NavMenu :navMenus="menuData"></NavMenu>
            </el-menu>
          </el-aside>
        </div>
        <el-main>
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import NavMenu from "../../components/NavMenu.vue";
export default {
  name: "AdminHome",
  components: {
    NavMenu: NavMenu,
  },
  data() {
    return {
      activeIndex: "aa",
      menuData: [
        {
          //一级
          entity: {
            id: 0,
            name: "/admin/home",
            alias: "首页",
          },
        },
        {
          //一级
          entity: {
            id: 1,
            name: "systemManage",
            alias: "用户管理",
          },
          //二级
          childs: [
            {
              entity: {
                id: 2,
                name: "/admin/cInformation",
                alias: "企业用户",
              },
            },
            {
              entity: {
                id: 3,
                name: "/admin/uInformation",
                alias: "普通用户",
              },
            },
          ],
        },
        {
          //一级
          entity: {
            id: 6,
            name: "userManage",
            alias: "招聘管理",
          },
          //二级
          childs: [
            {
              entity: {
                id: 7,
                name: "/admin/rInformation",
                alias: "招聘信息管理",
              },
            },
          ],
        },
        {
          //一级
          entity: {
            id: 9,
            name: "/",
            alias: "退出",
          },
        },
      ],
    };
  },
};
</script>

<style scoped>
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 60px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>
